<template>
  <div>
    标题：<input type="text" /> &nbsp;&nbsp;&nbsp;&nbsp; 消息类型：<select
      name=""
    ></select
    ><br />

    <div class="demo-date-picker">
      <div class="block">
        <span class="demonstration">开始时间</span>
        <el-date-picker
            v-model="value1"
            type="date"
            placeholder="Pick a date"
            :default-value="new Date(2010, 9, 1)"
        >
        </el-date-picker>
      </div>
      <div class="block">
        <span class="demonstration">结束时间</span>
        <el-date-picker
            v-model="value2"
            type="date"
            placeholder="Pick a date"
            :default-value="new Date(2010, 9, 1)"
        >
        </el-date-picker>
      </div>

    </div>

    优先级：<select name="" ></select>
    &nbsp;&nbsp;&nbsp;&nbsp;通知类型：<select name=""  v-model="userid">
    <option value="i.id" v-for="i in userdata" :key="i.id">{{i.username}}</option>
  </select
    ><br />
    内容：<br><textarea name="showText" id="" cols="30" rows="10"></textarea>
  </div>

</template>

<script>
import { ref } from 'vue';
import axios from 'axios';
export default {
  name: "notice",
  data() {
    const value1 = ref('')
    const value2 = ref('')
    return {
      value1,
      value2,
      userdata:'',
      userid:'',
    };
  },
  methods: {
    getuser(){
      axios({url:'/getalluser',method:'get'}).then(res=>{
        console.log(res)
        this.userdata=res.data.list
      })
    },


  },
  mounted() {
    this.getuser();
  },
};
</script>

<style scoped></style>
